<?php
class Site extends CGIApplication{

	protected $debug = 0;

	function cgiapp_prerun($rm=''){

	}

	function sendmail($subject, $body, $from_name, $from_email, $to_email, $reply_email) {
		require_once("/home/itrial/lib/Vendor/Mail/class-phpmailer.php");

		$mail = new PHPMailer();
	
		//Start: Temp remark
		$mail->IsSMTP();							// smtp
		$mail->Host     = "nmgmail01.nmg.hk";		// SMTP server
		$mail->SMTPAuth = false;					//
		//End: Temp remark
	
		//$mail->Username = "";    // username
		//$mail->Password = "";    // password
		$mail->From     = $from_email;		//	sender email
		$mail->FromName = $from_name;					//	sender name
		$mail->AddReplyTo($reply_email);		//	reply email
		$mail->AddAddress($to_email);                 		//
	
		$mail->IsHTML(true);                            	//
		$mail->Subject  = $subject;							//	subject
		$mail->Body     = $body;							//	content
	
		return $mail->Send();
	}
}
?>